import request from '@/utils/request';

// 登录
export function loginApi(data) {
  return request({
    url: '/users/legal/legal_by_password',
    method: 'post',
    data,
  });
}
// 获取用户信息
export function getUserInfoApi() {
  return request({
    url: '/users/legal/me',
    method: 'get',
  });
}
// 查询绑定的客户信息
export function getCustomerInfoApi() {
  return request({
    url: '/users/legal/with_customer',
    method: 'get',
  });
}
// 通过小程序登录
export function loginByWeappApi(data) {
  return request({
    url: '/users/legal/legal_by_weapp',
    method: 'post',
    data,
  });
}
// 更新用户信息
export function updateUserInfoApi(data) {
  return request({
    url: '/users/legal/update_info',
    method: 'put',
    data,
  });
}
